﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using xKnight.Models;

namespace xKnight.Attacking.Xss
{
    /// <summary>
    /// Type of AttackingSharedReource that is specialized for xss attacks
    /// </summary>
    public class XssAttackingSharedReource : AttackingSharedReource
    {
        /// <summary>
        /// All of the forms which were discovered during the Crawling phase inserted to this queue, Just before
        /// Any AttackAgent start his job.Then XssAttackingAgents will consume these forms
        /// in order to make appropriate attack vectors based on them and then will send them to the server (Form.Action)
        /// </summary>
        internal Queue<Form> SharedQueue { get; private set; }

        public XssAttackingSharedReource(Form[] sharedForms, object sharedLock,Attack sharedAttack)
            : base(sharedLock, sharedAttack)
        {
            
            this.SharedQueue = new Queue<Form>();
            foreach (var form in sharedForms)
                this.SharedQueue.Enqueue(form);
             
        }
    }
}
